from selenium import webdriver
from selenium.webdriver import ChromeOptions
import time

class Page():
    # 初始化端口
    def __init__(self):
        port = 'https://www.dxmpay.com/payfe/pc-station/entry/login/'
        # 伪装 无头模式
        option = ChromeOptions()
        # option.add_argument('--headless')
        option.add_experimental_option('excludeSwitches', ['enable-automation'])
        # option.add_experimental_option('useAutomationExtension', False)
        # 浏览器驱动初始化设定
        driver = webdriver.Chrome(options=option)
        driver.maximize_window()
        driver.implicitly_wait(10)
        driver.get(port)

        self.driver = driver

# 快照
def Qscreen(driver):
    driver.save_screenshot('../Report/log/'+str(time.time()) + ".png")



